// src/router/index.js
import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/App.vue' // 或一个专门的布局组件

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            component: Layout,
            redirect: '/dashboard',
            children: [
                { path: 'dashboard', name: '仪表盘', component: () => import('@/views/Dashboard.vue') },
                { path: 'orders', name: '订单管理', component: () => import('@/views/Orders.vue') },
            ]
        }
    ]
})
